package com.sc.nft.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.AllArgsConstructor;
import lombok.Getter;

@AllArgsConstructor
@Getter
public enum PrivilegeCollectionLevelEnum {
    ONE_LEVEL(1,"一级"),
    TWO_LEVEL(2,"二级"),
    THREE_LEVEL(3,"三级")

    ;
    @EnumValue
    private Integer code;
    private String levelName;
    public static String getValue(Integer code) {
        PrivilegeCollectionLevelEnum[] values = values();
        for (PrivilegeCollectionLevelEnum v : values) {
            if (v.getCode().equals(code)) {
                return v.getLevelName();
            }
        }
        return null;
    }



}
